﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/CommonPages/MasterPageBackEnd.master" AutoEventWireup="true" CodeFile="Staffmanager.aspx.cs" Inherits="ManagerViewStaff" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div class="block">
                            <h2>Pesonal Info</h2>
                            <ul>
                                <li><i class="fa fa-angle-right"></i>Change Password</li>
                                <li><i class="fa fa-angle-right"></i>Update Info</li>
                            </ul>
                        </div>
                        <div class="block">
                            <h2>PAGE</h2>
                            
                            <ul id="content-box-tabs">
                                <li><i class="fa fa-angle-right"></i>Students
                                    <ul class="managerOption">
                                        <li onclick="displayBlockStaff('StaffViewStudent')"><i class="fa fa-angle-right"></i>View students</li>                                        
                                    </ul>
                                </li>
                                <li><i class="fa fa-angle-right"></i>Competition
                                    <ul class="managerOption">                                        
                                        <li onclick="displayBlockStaff('StaffViewCompetition')"><i class="fa fa-angle-right"></i>View update competition</li>                                        
                                    </ul>
                                </li>
                                <li><i class="fa fa-angle-right"></i>Design of students
                                    <ul class="managerOption">
                                        <li onclick="displayBlockStaff('StaffViewDeign')"><i class="fa fa-angle-right"></i>Mark design</li>                                        
                                    </ul>
                                </li>
                                <li><i class="fa fa-angle-right"></i>Awards
                                    <ul class="managerOption">
                                        <li onclick="displayBlockStaff('')"><i class="fa fa-angle-right"></i>View update awards</li>                                        
                                        
                                    </ul>
                                </li>
                            </ul>
                        </div>                        
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
        <!-- students -->
        <div id="StaffViewStudent">                    
            <h4>Students</h4>                
            <asp:TextBox ID="txtSeachStudent" placeholder="enter name student to search" runat="server" ClientIDMode="Static" ></asp:TextBox>
            <asp:Button  ID="btnSeachStudent" runat="server" Text="Search" ClientIDMode="Static" OnClick="btnSeachStudent_Click"  />
            <asp:GridView CssClass="mGrid" PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt" 
                    ID="grvStudents" runat="server" AutoGenerateColumns="False" 
                DataKeyNames="studentId" Width="670px" BackColor="White" 
                    ClientIDMode="Static" AllowPaging="True" AllowSorting="True" PageSize="3" 
                    BorderColor="Black" BorderStyle="Solid" ShowFooter="True" 
                    ShowHeaderWhenEmpty="True" OnPageIndexChanging="grvStudents_PageIndexChanging" >
            <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                <Columns>
                    <asp:BoundField DataField="userName" HeaderText="User Name" />
                    <asp:BoundField DataField="fullName" HeaderText="Full Name" />
                    <asp:BoundField DataField="address" HeaderText="Address" />
                    <asp:BoundField DataField="email" HeaderText="Email" />
                    <asp:BoundField DataField="phoneNo" HeaderText="Phone No" />
                    <asp:BoundField DataField="major" HeaderText="Major" />
                    <asp:BoundField DataField="class" HeaderText="Class" />
                </Columns>            

            <PagerStyle CssClass="pgr"></PagerStyle>
            </asp:GridView>
        </div>
    
        <!-- competitions -->
            <!-- view competitions -->    
        <div id="StaffViewCompetition">                    
            <h4>Competitions</h4>                
            <asp:TextBox ID="txtSearchViewCompetition" placeholder="enter name competition to search" runat="server" ClientIDMode="Static" ></asp:TextBox>
            <asp:Button  ID="btnSearchViewCompetition" runat="server" Text="Search" ClientIDMode="Static" OnClick="btnSearchViewCompetition_Click"  />
            <asp:GridView CssClass="mGrid" PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt" 
                    ID="grvViewCompetition" runat="server" AutoGenerateColumns="False" 
                    AutoGenerateDeleteButton="True" 
                DataKeyNames="comId" Width="670px" BackColor="White" 
                    ClientIDMode="Static" AllowPaging="True" AllowSorting="True" PageSize="3" 
                    BorderColor="Black" BorderStyle="Solid" ShowFooter="True" 
                    ShowHeaderWhenEmpty="True" OnPageIndexChanging="grvViewCompetition_PageIndexChanging" OnRowDeleting="grvViewCompetition_RowDeleting" >
<AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                <Columns>
                    <asp:BoundField DataField="name" HeaderText="Name" />
                    <asp:BoundField DataField="awards" HeaderText="Awards" />
                    <asp:BoundField DataField="postDate" HeaderText="Post Date" DataFormatString="{0:d}" />
                    <asp:BoundField DataField="startDate" HeaderText="Start Date" DataFormatString="{0:d}" />
                    <asp:BoundField DataField="endDate" HeaderText="End Date" DataFormatString="{0:d}" />
                    <asp:BoundField DataField="description" HeaderText="Description" />
                    <asp:BoundField DataField="quotation" HeaderText="Quotation" />
                    <asp:BoundField DataField="userName" HeaderText="Manager" />
                </Columns>            

<PagerStyle CssClass="pgr"></PagerStyle>
                <SelectedRowStyle BorderColor="#663300" ForeColor="#0066FF" />
            </asp:GridView>

        </div>
                     
        <!--marks design-->
        <div id="StaffViewDeign">                    
            <h4>Mark design</h4>          
            <asp:Label ID="SelectCompetion" runat="server" Text="Select competiton" ClientIDMode="Static"></asp:Label>
            <asp:DropDownList ID="listCompetition" runat="server" ClientIDMode="Static" AutoPostBack="True" OnSelectedIndexChanged="listCompetition_SelectedIndexChanged">
            
            </asp:DropDownList>
            <div style="Width:670px;Height:200px;margin: 20px 10px 20px 10px;background:white">
                <asp:GridView CssClass="mGrid" PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt" 
                    ID="grvMarkDesign" runat="server" AutoGenerateColumns="False" 
                DataKeyNames="designId" Width="670px" BackColor="White" 
                    ClientIDMode="Static" AllowPaging="True" AllowSorting="True" PageSize="3" 
                    BorderColor="Black" BorderStyle="Solid" ShowFooter="True" 
                    ShowHeaderWhenEmpty="True" SelectedIndex="0" AutoGenerateSelectButton="True" OnSelectedIndexChanged="grvMarkDesign_SelectedIndexChanged">
                    <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                <Columns>
                    <asp:BoundField HeaderText="Name" DataField="name" />
                    <asp:BoundField HeaderText="Post Date" DataFormatString="{0:d}" DataField="postDate" />
                    <asp:BoundField HeaderText="Description" DataField="description" />
                    <asp:BoundField HeaderText="Quotation" DataField="quotation" />
                    <asp:BoundField HeaderText="Student" DataField="userName" />
                </Columns>                       
                <PagerStyle CssClass="pgr"></PagerStyle>
                    <SelectedRowStyle BorderColor="Lime" BorderStyle="Double" ForeColor="Red" />
                </asp:GridView>
                
            </div> 
            <p><a onclick="displayBlockStaff('StaffMarkDeign')" class="btnchanged">Detail</a></p>                
        </div>

        <div id="StaffMarkDeign" class="backgroundContentRight">
            <table class="tableMarkDesign">
                <tr>
                    <td class="tdlist">
                        <asp:Label  ID="lblStudentName" runat="server" Text="Name student"></asp:Label>                        
                    </td>
                    <td>
                        <asp:Label ID="lblShownameStudent" runat="server" ></asp:Label>                        
                    </td>
                </tr>
                <tr>
                    <td class="tdlist">
                        <asp:Label  ID="lblPostDate" runat="server" Text="Post Date:"></asp:Label>
                        
                    </td>
                    <td>
                        <asp:Label ID="lblShowPostDate" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="tdlist">
                        <asp:Label  ID="lblQuotationDesign" runat="server" Text="Quotation Design :"></asp:Label>                            
                    </td>
                    <td>
                        <asp:Label ID="lblShowQuotationDesign" runat="server" ></asp:Label>                                                 
                    </td>
                </tr>
                <tr>
                    
                    <td class="tdlist">
                         <asp:Label  ID="lblDescriptionDesgin" runat="server" Text="Description Desgin :"></asp:Label>                            
                        
                    </td>
                    <td>
                        <asp:TextBox ID="txtShowDescriptionDesgin" runat="server" TextMode="MultiLine" 
                            ClientIDMode="Static" Enabled="False" ><p>phan nay hien thi du lieu sau khi click vao gridview</p></asp:TextBox>                        
                    </td>
                </tr>
                <tr>
                    
                    <td class="tdlist">
                         <asp:Label  ID="lblMarkDesign" runat="server" Text="Mark :"></asp:Label>                            
                        
                    </td>
                    <td>
                        <asp:TextBox ID="txtMarkDesign" placeholder="enter mark of design" runat="server" ClientIDMode="Static" AutoPostBack="True" MaxLength="10">0</asp:TextBox>
                        <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtMarkDesign" ErrorMessage="Mark:Integer, 0-10" ForeColor="Red" MaximumValue="10" MinimumValue="0" Type="Integer"></asp:RangeValidator>
                    </td>
                </tr>   
                <tr>
                    
                    <td class="tdlist">
                         <asp:Label  ID="lblDesignOfStudent" runat="server" Text="Desgin :"></asp:Label>                            
                        
                    </td>                   
                </tr>  
                           
            </table>
            <table class="tableMarkDesign">
                <tr>
                    <td class="imgDesign">
                    <p>phan nay hien thi anh cua student sau khi click vao gridview</p>
                    </td>
                </tr>
                
            </table>
            <asp:Button ID="btnMarkDesign" CssClass="btnupdate" runat="server" Text="Update" OnClick="btnMarkDesign_Click" />
        </div>
</asp:Content>

